#include "cc_l2d.h"



CC_HDL2D::~CC_HDL2D		(void)
{
	erase();
}

void	CC_HDL2D::erase	(void)
{
	CC_L2D*	pI = first();
	while (pI != NULL)
		{
			CC_L2D*	pI2 = pI->next();
			delete pI;
			pI = pI2;
		}
}

/// insert a item at specified index
void				CC_HDL2D::insert(CC_L2D* p_new, int index)
{
	CC_L2D* it_i = item(index);
	if (it_i == NULL)
		append(p_new);
	else
		it_i->insBefore(this, p_new);
}
